import Ax from './api';

export default {
  userAdd: (param = {}) => Ax.put(`/user/add`, param),
  userEdit: (param = {}) => Ax.put(`/user/edit`, param),
  userDelete: (query = {}) => Ax.delete(`/user/delete?_id=${query._id}`),
  userList: (param = {}) => Ax.post(`/user/list`, param),
  userAll: (query = {}) => Ax.get(`/user/all`),
  userDetail: (query = {}) => Ax.get(`/user/detail?_id=${query._id}`),
  userModifyPwd: (param = {}) => Ax.put(`/user/modifyPwd`, param),
  userResetPwd: (param = {}) => Ax.put(`/user/resetPwd`, param),
  login: (param = {}) => Ax.post(`/user/login`, param),
  refreshToken: (param = {}) => Ax.post(`/user/refreshToken`, param),
  getVersion: () => Ax.get(`/version`),
  upgrade: (param = {}) => Ax.post(`/debug/upgrade/v3.6.0`, param),
};
